# python循环的优化

# 1.尽量减少循环内部不必要的计算
# 2.嵌套循环中，尽量减少内层循环的计算，尽可能向外提。
# 3.局部变量查询较快，尽量使用局部变量


# 测试zip()并行迭代
for i in [1,2,3]:
    print(i)

names = ("高淇","高老二","高老三","高老四")
ages = (18,16,20,25)
jobs = ("老师","程序员","公务员")

for name,age,job in zip(names,ages,jobs):
    print("{0}--{1}--{2}".format(name,age,job))
for i in range(3):
    print("{0}--{1}--{2}".format(names[i],ages[i],jobs[i]))


# 推导式创建序列


